<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件</title>
  <script>
    function turnon(){
      document.getElementById("bubble").src="imags/on.png"
    }
    function turnoff(){
      document.getElementById("bubble").src="imags/off.png"
    }
  </script>
</head>
<body>
<img id="bubble" src="imags/off.png"><br>
<button onclick="turnon()">开灯</button>
<button onclick="turnoff()">壁灯</button>
</body>
</html>